<template>
	<view class="itemWrap" @tap="click()">
		<view class="time">
			<text>{{props.item?.createTime}}</text>
		</view>
		<view class="itemTopWrap">
			<view class="">
				<image class="userImg" :src="data.httpUrl+'/app/file/viewFile?fileId='+props.item?.logFileId" mode=""></image>
			</view>
			<view class="" style="flex:1">
				<view class="biaoti">
					<text class="label">{{props.item?.title}}</text>
					<text class="status">{{props.item?.orderStateName}}</text>
				</view>
				<view class="zhiWrap">
					<text class="num">¥{{props.item?.productAmount}}</text>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script setup lang="ts">
	import { ref, reactive } from 'vue';
	import NavBar from '@/components/navBar.vue';
	
	const data = reactive<any>({
			httpUrl: getApp().globalData.baseUrl,
		})

const props = defineProps({
		item:{
			type:Object
		}
	})
	
	const emit = defineEmits(['itemClick'])
	
	const click = () =>{
		 emit('itemClick', props.item)
	}

</script>

<style lang="scss" scoped>
	.itemWrap{
		background-color: #fff;
		padding: 24rpx;
		margin: 24rpx;
		border-radius: 24rpx;
		
		.itemTopWrap{
			display: flex;
			align-items: center;
		}
		
		.zhiWrap{
			display: flex;
			margin-top: 8rpx;
		}
		
		.userImg{
			width: 128rpx;
			height: 128rpx;
			border-radius: 64rpx;
			margin-right: 16rpx;
		}
	}
	
	.time{
		margin-bottom: 24rpx;
		text {
			font-size: 32rpx;
			color: #262626;
			font-weight: bold;
		}
	}
	
	.biaoti{
		flex:1;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	
	.label{
		font-size: 32rpx;
		color: #262626;
		font-weight: bold;
	}
	
	.num{
		font-size: 28rpx;
		color: #8C8C8C;
	}
	
	.status{
		font-size: 24rpx;
		color: #8C8C8C;
	}
	
	
	
</style>